import uView from 'uview-ui';
Vue.use(uView);

import util from './utils/util';
import url from './utils/url';
import api from './utils';

Vue.prototype.$url = url; //url路径
Vue.prototype.$util = util; //工具类
Vue.prototype.$api = api; //请求方式

import $ from './utils/common.js';
//挂载到全局
Vue.prototype.$ = $;

import loadMore from '@/components/loadMore.vue'; //加载更多
import pubBottomTabbar from '@/components/pubBottomTabbar.vue'; //自定义底部tabbar
import emptyData from '@/components/emptyData.vue'; //自定义底部tabbar
import unLogin from '@/components/unLogin.vue'; //自定义底部tabbar

Vue.component('pubBottom-tabbar', pubBottomTabbar);
Vue.component('emptyData', emptyData);
Vue.component('load-more', loadMore);
Vue.component('un-login-popup', unLogin);

Vue.prototype.$staticImgurl = '/static/'; //本地挂载静态图片基础路径

// #ifndef VUE3
import Vue from 'vue';
import App from './App';

Vue.config.productionTip = false;

App.mpType = 'app';

const app = new Vue({
  ...App
});
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue';
import App from './App.vue';
export function createApp() {
  const app = createSSRApp(App);
  return {
    app
  };
}
// #endif
